<?php if (!defined('THINK_PATH')) exit();?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>多彩气质宝贝-国际化儿童早教机构</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="__PUBLIC__/css/base.css" type="text/css" rel="stylesheet" />
<link type="text/css" rel="Stylesheet"
	href="__PUBLIC__/css/blog/main.css" />

<script src="__PUBLIC__/js/jquery.js" type="text/javascript"></script>
<script src="__PUBLIC__/ueditor/editor_all.js" type="text/javascript"></script>
<script src="__PUBLIC__/ueditor/editor_config.js" type="text/javascript"></script>

<link rel="stylesheet" type="text/css"
	href="__PUBLIC__/ueditor/themes/default/ueditor.css" />

<script type="text/javascript">
		function save(type){
			
			if($('#title').val()=="" || $('#title').val().length==0){
				alert("文章标题不能为空，请重新输入！");
				$('#title').focus();
				return ;
			}
			if($('#title').val().length>30){
				alert("文章标题不能超过三十个字符，请重新输入！");
				$('#title').focus();
				return ;
			}
				$.post('__URL__/insert/',
		    	    {	
						'content':editor.getContent(),
						'title':$('#title').val(),
						'commentright':$("input[name='radComment']:checked").val(),
						'summary':$('#summary').val(),
						'type':type
			    	},
					    function(data){
							alert(data.info);
							window.location = "__APP__/LoginUser/index/type/"+type ;
					    },
				    'json');	
			
				    
		}


		function update(type){			
			$tempId = '' ;
			if('<?php echo ($vo['id']); ?>'!=''){
				tempId = '<?php echo ($vo['id']); ?>' ;
			}			
			$.post('__URL__/update/',
		    	    {	
	    	    		'id':tempId,
						'content':editor.getContent(),
						'title':$('#title').val(),
						'commentright':$("input[name='radComment']:checked").val(),
						'summary':$('#summary').val()
						//'status':type
			    	},
					    function(data){
							alert(data.info);
							window.location = "__APP__/LoginUser/index/type/blog" ;
					    },
				    'json');
		}
		
</script>



</head>

<body onload="menu0display()">




<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script type="text/javascript" language="javascript">


function menu0display(){
	var menu = document.getElementById("menu"); 
	var menuLength = menu.getElementsByTagName("li");
	var arry = new Array("solid #ff6d25 6px","solid #ff7b7c 6px","solid #ffb000 6px","solid #8ccd00 6px","solid #00bc00 6px","solid #00d0e3 6px","solid #d479ff 6px","solid #a200ff 6px");

	var chooseId = document.getElementById("<?php echo ($moduleInfo['cssid']); ?>");
	
	//将以前老的样式干掉
	for(var i=0;i<menuLength.length;i++){		
		var menuno = document.getElementById("menu"+i);		
		if(menuno.className == "black fontbold"){ 
			menuno.className = "white";			
		}		
	}
	//添加新样式
	var isdefault = 1 ;
	for(var i=0;i<menuLength.length;i++){		
		var menuno = document.getElementById("menu"+i);		
		if("<?php echo ($moduleInfo['cssid']); ?>"==("menu"+i)){
			menuno.className = "black fontbold";
			document.getElementById("menu00").className = "w100auto mT20 menuB";
			document.getElementById("menu00").style.borderBottom = arry[i];
			isdefault = 0;
		}
	}
	//如果在最后都没有设置 black fontbold 样式，则默认加在首页上
	if(isdefault==1){
		document.getElementById("menu0").className = "black fontbold";
		document.getElementById("menu00").className = "w100auto mT20 menuB";		
		document.getElementById("menu00").style.borderBottom = "solid #ff6d25 6px";
	}
	return ;

	}
</script>
</head>
<body>


<div class="lineB line24" style="background: #f5f5f5; height: 24px;">
<div class="w960"><span class="fLeft">多彩气质宝贝 - 重庆站 [切换城市] <a
	class="orange" href="#">重庆</a> <a class="orange" href="#">上海</a></span> <span
	class=" fRight">&nbsp; 
<?php if(isset($_SESSION[C('USER_AUTH_KEY')])): ?><span class="orange">您好，<?php echo ($_SESSION[C('USER_AUTH_KEY')]); ?></span>&nbsp;&nbsp;
<a href="__APP__/LoginUser/index/type/blog" class="orange">我的首页</a>&nbsp;&nbsp;|
<a href="__APP__/Register/loginout/" class="orange">安全退出</a>&nbsp;&nbsp;|
<?php else: ?> <span class="orange">您还未登录！</span>&nbsp;&nbsp;| <a
	href="__APP__/Register/login/" class="orange">登陆</a>&nbsp;|&nbsp;&nbsp;<a
	href="__APP__/Register/" class="orange">注册</a>&nbsp;|&nbsp;&nbsp;<?php endif; ?> 
<a  class="Gray" href="__APP__/ToolTip/index/code/sqll" target="_blank">社区理念</a>&nbsp;|&nbsp;<a
	class="Gray" href="__APP__/ToolTip/index/code/jyts" target="_blank">教育特色</a>&nbsp;|&nbsp;<a
	class="Gray" href="__APP__/ToolTip/index/code/jxhj" target="_blank">教学环境</a>&nbsp;|&nbsp;<a
	class="Gray" href="__APP__/ToolTip/index/code/szjs" target="_blank">师资介绍</a>&nbsp;|&nbsp;<a
	class="Gray" href="__APP__/ToolTip/index/code/cjwt" target="_blank">常见问题</a></span></div>
</div>
<div class="w960 clear"
	style="height: 92px; background: url(__PUBLIC__/image/logo-227.png) no-repeat; position: relative; z-index: 0;">
<span class="bgImg"
	style="background-position: 0 0; width: 321px; height: 66px; position: absolute; bottom: -30px; right: 0; z-index: 0;"></span>
</div>
<div class="w960 clear">
<ul id="menu" class="line24  font18"
	style="position: relative; z-index: 0; font-family: '微软雅黑';">
	<li class="fLeft menuli  bgImg"
		style="background-position: 0 -254px; z-index: 1; left: 0;"><a
		id="menu0" class="black fontbold" href="__APP__/Index/">&nbsp;&nbsp;&nbsp;首&nbsp;&nbsp;页&nbsp;&nbsp;</a></li>
	<li class="fLeft menuli bgImg"
		style="background-position: 0 -217px; z-index: 2; left: 117px;">
	<a id="menu1" class="white" href="__APP__/Course/">课程介绍</a></li>
	<li class="fLeft menuli bgImg"
		style="background-position: 0 -180px; z-index: 3; left: 234px;">
	<a id="menu2" class="white" href="__APP__/NewsRelease/">新闻公告</a></li>
	<li class="fLeft menuli bgImg"
		style="background-position: 0 -143px; z-index: 4; left: 351px;">
	<a id="menu3" class="white" href="__APP__/Video/">精彩视频</a></li>
	<li class="fLeft menuli bgImg"
		style="background-position: 0 -105px; z-index: 5; left: 468px;">
	<a id="menu4" class="white" href="__APP__/Appraise/">家长评价</a></li>
	<li class="fLeft menuli bgImg"
		style="background-position: 0 -69px; z-index: 6; left: 585px;"><a
		id="menu5" class="white" href="__APP__/Evaluation/">专业评测</a></li>
	<li class="fLeft menuli bgImg"
		style="background-position: 0 -292px; z-index: 7; left: 702px;">
	<a id="menu6" class="white" href="__APP__/AboutUs/">关于我们</a></li>
	<li class="fLeft menuli bgImg"
		style="background-position: 0 -329px; z-index: 8; left: 819px;">
	<a id="menu7" class="white" href="__APP__/Blog/">育儿博客</a></li>
</ul>
</div>
<!-- 
<div id="menu00" class="w100auto mT20 menuB" style="border-bottom:solid #ff6d25 6px;"></div>
 -->
 <div id="menu00" ></div>

<div id="contain" class="w950 clear mT10">
</body>
</html>


<div id="wrap">

<div class="head">

<div class="user_info">

<dl>

	
	<ul>
		<li class="user_name"><span><?php echo ($_SESSION[C('USER_AUTH_KEY')]); ?></span></li>

		<li class="feed_link"><a href="__APP__/LoginUser/index/type/blog">我发布的博客</a>|<a
			href="__APP__/LoginUser/index/type/appraise">我发布的评价</a></li>
	</ul>
	
</dl>

</div>

<div style="float: right; margin-top: 20px; color: Red;"></div>

</div>
<table width="90%" border="0">
  <tr>
    <td width="150" align="right" valign="top" class="p5"><?php if( ${type} == 'blog' ): ?><p class="subtit">文章标题：</p>
<?php else: ?>
	<p class="subtit">评价标题：</p><?php endif; ?></td>
    <td valign="top" class="p5"><input type="text" id="title" value="<?php echo ($vo['title']); ?>"
	style="width: 560px; height: 20px; float: left;" maxlength="100" /></td>
  </tr>
  <tr>
    <td width="150" align="right" valign="top" class="p5"><?php if( ${type} == 'blog' ): ?><p class="subtit">文章摘要：</p>
<?php else: ?>
	<p class="subtit">评价摘要：</p><?php endif; ?></td>
    <td valign="top" class="p5"><textarea rows="5" cols="50" id="summary"><?php echo ($vo['summary']); ?></textarea></td>
  </tr>
  <tr>
    <td width="150" align="right" valign="top" class="p5"><p id="p_comment" class="subtit">是否允许评论：</p></td>
    <td valign="top" class="p5">	<div id="d_comment" class="radioBox">
	<?php if($vo['commentright'] == 1): ?><input type="radio"
		name="radComment" id="radComment2" value="1" checked="checked" /><label
		for="radComment2">允许评论</label> <input type="radio" name="radComment"
		id="radComment1" value="0" /><label for="radComment1">禁止评论</label> <?php else: ?>
	<input type="radio" name="radComment" id="radComment2" value="1" /><label
		for="radComment2">允许评论</label> <input type="radio" name="radComment"
		id="radComment1" value="0" checked="checked" /><label for="radComment1">禁止评论</label><?php endif; ?>
	</div></td>
  </tr>
  <tr>
    <td width="150" align="right" valign="top" class="p5"><p class="subtit">文章内容：</p></td>
    <td valign="top" class="p5"><div class="section"><script type="text/plain" id="myEditor">
				<?php echo ($vo['content']); ?>	
			</script> <script type="text/javascript">
			    var editor = new baidu.editor.ui.Editor();   			   
			    editor.render('myEditor');
			    editor.focus();
			</script></div>

<div class="btn_area_1 mT10">
	<?php if(( empty($vo['id']) )): ?><input id="btnPublish" type="button" class="input_btn_1" value="发表文章"
		title="保存并跳转" onclick="save('<?php echo ($type); ?>');" /> 
	<?php else: ?> <input
		id="btnPublish" type="button" class="input_btn_1" value="更新文章"
		title="保存并跳转" onclick="update('<?php echo ($type); ?>');" /><?php endif; ?> 
</div></td>
  </tr>

</table>


</body>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div class="line24 clearBoth mT10 footerbg p10" align="center"><a
	href="__APP__/Index">回到首页</a>&nbsp;|&nbsp;<a
	href="__APP__/ToolTip/index/code/zxns" target="_blank">招贤纳士</a>&nbsp;|&nbsp;<a
	href="__APP__/ToolTip/index/code/hzjm" target="_blank">合作加盟</a>&nbsp;|&nbsp;<a
	href="__APP__/ToolTip/index/code/fltk" target="_blank">法律条款</a>&nbsp;|&nbsp;<a
	href="__APP__/ToolTip/index/code/wzdt" target="_blank">网站地图</a>&nbsp;|&nbsp;<a
	href="__APP__/ToolTip/index/code/yqlj" target="_blank">友情链接</a><br />
版权所有:Colourful Baby 备案号：渝IC00000</div>
</body>
</html>
</html>